package com.tty.service;

import com.tty.annotation.SysLog;
import com.tty.mapper.StatMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @ClassName StatServiceImpl
 * @Description TODO
 * @Author Tommy Yeung
 * @Date 2022/11/24 上午 09:06
 **/

@Service
public class StatServiceImpl implements StatService{

    @Autowired
    StatMapper statMapper;

    @SysLog("业务层: 取得 CreatedTime 统计")
    @Override
    public Date getCreatedTimeStat(String originUrl) {
        return statMapper.getUrlByOriginUrlAndMaxCreatedTime(originUrl);
    }

    @SysLog("业务层: 取得 LastVisited 统计")
    @Override
    public Date getLastVisitedStat(String originUrl) {
        return statMapper.getUrlByOriginUrlAndMaxLastVisited(originUrl);
    }



}
